package cn.yanxiaohui.service.web.pattern.proxy.jdk.myself;

import cn.yanxiaohui.service.web.pattern.proxy.jdk.myself.impl.Lol;
import cn.yanxiaohui.service.web.pattern.proxy.jdk.myself.impl.MyInvocationHandlerImpl;

public class Test {
    public static void main(String[] args) {
        try{
            Game game = (Game) MyProxy.newProxyInstance(Game.class, new MyInvocationHandlerImpl(new Lol()));
            game.play();
        } catch (Throwable e){
            e.printStackTrace();
        }
    }
}
